import request from '@/utils/request';
import type { SkuInfoDataResponse, SkuListDataResponse } from './type';
enum API {
    SKU_LIST = '/admin/product/list',
    SKU_ON_SALE = '/admin/product/onSale',
    SKU_OFF_SALE = '/admin/product/cancelSale',
    SKU_INFO = '/admin/product/getSkuInfo',
    SKU_DELETE = '/admin/product/deleteSku'
}
export const reqSkuList = (page: number, limit: number) => request.get<any, SkuListDataResponse>(API.SKU_LIST + `/${page}/${limit}`)
export const reqSkuOnSale = (skuId:number) => request.get<any,any>(API.SKU_ON_SALE + `/${skuId}`)
export const reqSkuOffSale = (skuId:number) => request.get<any,any>(API.SKU_OFF_SALE + `/${skuId}`)
export const reqSkuInfo = (skuId:number) => request.get<any,SkuInfoDataResponse>(API.SKU_INFO + `/${skuId}`)
export const reqDeleteSku = (skuId:number) => request.delete<any,any>(API.SKU_DELETE + `/${skuId}`)
